<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .bg {
        position: relative;
        width: 300px;
        height: 300px;
        margin: 100px auto;
        /*开启透视*/
        perspective: 500px;
        /*开启3D模式*/
        transform-style: preserve-3d;
        transition: all .4s;
    }

    .bg:hover {
        transform: rotateY(180deg);
    }

    .front,
    .back {
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        text-align: center;
        line-height: 300px;
        color: aliceblue;
        font-size: 35px;
    }

    .front {
        background-color: pink;
        z-index: 1;
        backface-visibility: hidden;
    }

    .back {
        background-color: purple;
        transform: rotateY(180deg);
    }
</style>

<body>
    <div class="bg">
        <div class="front">黑马程序员</div>
        <div class="back">pink老师等你</div>
    </div>
</body>

</html>